<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Pages extends CI_Controller {
	
	function __construct(){
		parent::__construct();
		$this->load->helper(array('link'));
		$this->load->model(array('page_model', 'apply_model'));

	}
	
	
	function index(){
		exit('page');
	}
	
	
	function detail($name = ''){
		#get data from DB.
		$page					=	$this->page_model->get_page($name);
		$country				=	$this->apply_model->get_country();
		
		#assign data.
		$data['title']			=	$page['title'];
		$data['description']	=	$page['description'];
		$data['content']		=	$page['content'];
		$data['country']		=	$country;
				
		$data['tpl_file']		=	"page";
		$this->load->view('layout/index', $data);
	}
	
}
/* End of file pages.php */
/* Location: ./application/controllers/pages.php */